/**
 * @description 封装axios
 */
import axios from "axios";
import { APIKEY, angetUrl } from "./constant";

// 创建 Axios 实例
const axiosInstance = axios.create({
    baseURL: angetUrl,
    timeout: 1000000,
    // withCredentials: true, // 线下测试使用
    // responseType: 'json',
});

axiosInstance.interceptors.request.use((config) => {
    config.headers['Apikey'] = APIKEY;
  
    return config;
})


export default axiosInstance;
